<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>项目</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
#progressBar {width:20px; height:4px; background:#FFFFFF; border:1px solid #000000 padding:1px;}
#progressBarItem {height:8px; background:#C2C8F5;}
</style>
<link href="/sbm/css/table.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<table width="94%" id="mytab" border="1" class="t1" align="center">
		<tr>
			<td align="right"><a href="showalluser">新添一个工作包</a>
			</td>
		</tr>
		<tr>
			<td align="center"><span class="errorAndmes"><s:actionerror
						cssStyle="font-family: Arial,Helvetica,sans-serif" /> </span>
			</td>
		</tr>
	</table>
	<table width="94%" id="mytab" border="1" class="t1" align="center">
		<tr>
			<th width="4%">编号</th>
			<th width="13%">名称</th>
			<th width="13%">描述</th>
			<th width="4%">类型</th>
			<th width="5%">状态</th>
			<th width="5%">优先级</th>
			<th width="9%">进度</th>
			<th width="15%">时间</th>
			<th width="4%">工作量</th>
			<th width="5%">负责人</th>
			<th width="4%">留言数</th>
			<th width="10%">操作</th>
		</tr>
		<s:iterator value="worklist" id="work">
			<tr class="t1">
				<td align="center"><s:property value="#work.wpid" /> <s:hidden
						name="work.undo" />
				</td>
				<td><s:if test="#work.past == 1">
						<span class="show"> <a
					href="<s:url action="showonework">
    			<s:param name="work.wpid" value="#work.wpid"></s:param>
    			<s:param name="work.taskid" value="#work.taskid"></s:param><s:param name="work.undo" value="#work.undo"></s:param></s:url>">
						<s:property value="#work.title" /> </a></span>
					</s:if> <s:else>
						<a
					href="<s:url action="showonework">
    			<s:param name="work.wpid" value="#work.wpid"></s:param>
    			<s:param name="work.taskid" value="#work.taskid"></s:param><s:param name="work.undo" value="#work.undo"></s:param></s:url>">
						<s:property value="#work.title" /></a>
					</s:else></td>
				<td><s:property value="#work.description" escape="false" /></td>
				<td><s:if test="#work.type ==0 ">任务</s:if> <s:elseif
						test="#work.type ==1 ">改进</s:elseif> <s:elseif
						test="#work.type ==2 ">BUG</s:elseif> <s:elseif
						test="#work.type ==3 ">讨论</s:elseif> <s:else>未定</s:else>
				</td>
				<td><s:if test="#work.status == 0">不活跃</s:if> <s:else>活跃</s:else>
				</td>
				<td><s:if test="#work.priority ==0 ">紧急</s:if> <s:elseif
						test="#work.priority ==1 ">优先</s:elseif> <s:elseif
						test="#work.priority ==2 ">普通</s:elseif> <s:elseif
						test="#work.priority ==3 ">置后</s:elseif> <s:else>延迟</s:else></td>
						<td id="progressbar"><s:property value="#work.progress"/>%<div id="progressBarItem" style="width:<s:property value="#work.progress"/>% "></div></td>
						
				<!--<td><s:property value="#work.progress" />%</td>-->
				
				<td><s:if test="#work.startdate != null">
						<s:property value="#work.startdate" />
					</s:if> <s:else>起始时间未定</s:else> <s:if test="#work.deadline != null">~&nbsp;<s:property
							value="#work.deadline" />
					</s:if> <s:else>,结束时间未定</s:else></td>
				<td><s:property value="#work.workamount" />
				</td>
				<td><s:property value="#work.name" />
				</td>
				<td align="center"><s:property value="#work.noteno" /></td>
				<td><a
					href="<s:url action="showallnote">
    			<s:param name="work.wpid" value="#work.wpid"></s:param></s:url>">
						留言 </a><a
					href="<s:url action="showallatt">
    			<s:param name="work.wpid" value="#work.wpid"></s:param></s:url>">
						附件 </a> <a
					href="<s:url action="showonework">
    			<s:param name="work.wpid" value="#work.wpid"></s:param>
    			<s:param name="work.taskid" value="#work.taskid"></s:param><s:param name="work.undo" value="#work.undo"></s:param></s:url>">
						修改 </a><a
					href="<s:url action="deletework">
				<s:param name="work.wpid" value="#work.wpid"></s:param>
				<s:param name="work.taskid" value="#work.taskid"></s:param></s:url>"
					onclick="return confirm('确定删除？')?true:false;">删除 </a></td>
			</tr>
		</s:iterator>
		<tr>
			<td align="center" colspan="6">共<s:property
					value="#session.worktotalpage" />页&nbsp;&nbsp;&nbsp;第<s:property
					value="pageNow+1" />页&nbsp;&nbsp;&nbsp; <s:if test="pageNow > 0">
					<a
						href="<s:url action="showallwork"><s:param name="pageNow" value="pageNow-1" /><s:param name="work.taskid" value="#work.taskid"></s:param></s:url>">上一页</a>&nbsp;&nbsp;&nbsp;</s:if>
				<s:if test=" pageNow+1 != #session.worktotalpage">
					<a
						href="<s:url action="showallwork"><s:param name="pageNow" value="pageNow+1" /><s:param name="work.taskid" value="#work.taskid"></s:param></s:url>">下一页</a>
				</s:if></td>
			<td colspan="6" align="right"><a href="showalltask">返回所有项目</a>
			</td>
		</tr>
	</table>
</body>
</html>
